home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / extensions / Xfixes.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  6KB  |  221 lines

  1. /*
  2.  * $XFree86: xc/lib/Xfixes/Xfixes.h,v 1.1 2002/11/30 06:21:45 keithp Exp $
  3.  *
  4.  * Copyright ⌐ 2002 Keith Packard, member of The XFree86 Project, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of Keith Packard not be used in
  11.  * advertising or publicity pertaining to distribution of the software without
  12.  * specific, written prior permission.  Keith Packard makes no
  13.  * representations about the suitability of this software for any purpose.  It
  14.  * is provided "as is" without express or implied warranty.
  15.  *
  16.  * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  17.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  18.  * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  19.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  20.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  21.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  22.  * PERFORMANCE OF THIS SOFTWARE.
  23.  */
  24.  
  25. #ifndef _XFIXES_H_
  26. #define _XFIXES_H_
  27.  
  28. #include <X11/extensions/xfixeswire.h>
  29.  
  30. #include <X11/Xfuncproto.h>
  31.  
  32. /*
  33.  * This revision number also appears in configure.ac, they have
  34.  * to be manually synchronized
  35.  */
  36. #define XFIXES_REVISION    0
  37. #define XFIXES_VERSION    ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION))
  38.  
  39. typedef struct {
  40.     int type;            /* event base */
  41.     unsigned long serial;
  42.     Bool send_event;
  43.     Display *display;
  44.     Window window;
  45.     int subtype;
  46.     Window owner;
  47.     Atom selection;
  48.     Time timestamp;
  49.     Time selection_timestamp;
  50. } XFixesSelectionNotifyEvent;
  51.  
  52. typedef struct {
  53.     int type;            /* event base */
  54.     unsigned long serial;
  55.     Bool send_event;
  56.     Display *display;
  57.     Window window;
  58.     int subtype;
  59.     unsigned long cursor_serial;
  60.     Time timestamp;
  61.     Atom cursor_name;
  62. } XFixesCursorNotifyEvent;
  63.  
  64. typedef struct {
  65.     short        x, y;
  66.     unsigned short  width, height;
  67.     unsigned short  xhot, yhot;
  68.     unsigned long   cursor_serial;
  69.     unsigned long   *pixels;
  70. #if XFIXES_MAJOR >= 2
  71.     Atom        atom;            /* Version >= 2 only */
  72.     const char        *name;            /* Version >= 2 only */
  73. #endif
  74. } XFixesCursorImage;
  75.  
  76. #if XFIXES_MAJOR >= 2
  77. /* Version 2 types */
  78.  
  79. typedef XID XserverRegion;
  80.  
  81. typedef struct {
  82.     short        x, y;
  83.     unsigned short  width, height;
  84.     unsigned short  xhot, yhot;
  85.     unsigned long   cursor_serial;
  86.     unsigned long   *pixels;
  87.     Atom        atom;
  88.     const char        *name;
  89. } XFixesCursorImageAndName;
  90.  
  91. #endif
  92.  
  93. _XFUNCPROTOBEGIN
  94.  
  95. Bool XFixesQueryExtension (Display *dpy, int *event_basep, int *error_basep);
  96. Status XFixesQueryVersion (Display *dpy,
  97.                 int     *major_versionp,
  98.                 int     *minor_versionp);
  99.  
  100. int XFixesVersion (void);
  101.  
  102. void
  103. XFixesChangeSaveSet (Display    *dpy,
  104.              Window    win,
  105.              int    mode,
  106.              int    target,
  107.              int    map);
  108.  
  109. void
  110. XFixesSelectSelectionInput (Display        *dpy,
  111.                 Window        win,
  112.                 Atom        selection, 
  113.                 unsigned long   eventMask);
  114.  
  115. void
  116. XFixesSelectCursorInput (Display    *dpy,
  117.              Window        win,
  118.              unsigned long    eventMask);
  119.  
  120. XFixesCursorImage *
  121. XFixesGetCursorImage (Display *dpy);
  122.  
  123. #if XFIXES_MAJOR >= 2
  124. /* Version 2 functions */
  125.  
  126. XserverRegion
  127. XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles);
  128.  
  129. XserverRegion
  130. XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap);
  131.  
  132. XserverRegion
  133. XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind);
  134.  
  135. XserverRegion
  136. XFixesCreateRegionFromGC (Display *dpy, GC gc);
  137.  
  138. XserverRegion
  139. XFixesCreateRegionFromPicture (Display *dpy, XID picture);
  140.  
  141. void
  142. XFixesDestroyRegion (Display *dpy, XserverRegion region);
  143.  
  144. void
  145. XFixesSetRegion (Display *dpy, XserverRegion region,
  146.          XRectangle *rectangles, int nrectangles);
  147.  
  148. void
  149. XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src);
  150.  
  151. void
  152. XFixesUnionRegion (Display *dpy, XserverRegion dst,
  153.            XserverRegion src1, XserverRegion src2);
  154.  
  155. void
  156. XFixesIntersectRegion (Display *dpy, XserverRegion dst,
  157.                XserverRegion src1, XserverRegion src2);
  158.  
  159. void
  160. XFixesSubtractRegion (Display *dpy, XserverRegion dst,
  161.               XserverRegion src1, XserverRegion src2);
  162.  
  163. void
  164. XFixesInvertRegion (Display *dpy, XserverRegion dst,
  165.             XRectangle *rect, XserverRegion src);
  166.  
  167. void
  168. XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy);
  169.  
  170. void
  171. XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src);
  172.  
  173. XRectangle *
  174. XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);
  175.  
  176. XRectangle *
  177. XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region, 
  178.                 int *nrectanglesRet,
  179.                 XRectangle *bounds);
  180.  
  181. void
  182. XFixesSetGCClipRegion (Display *dpy, GC gc, 
  183.                int clip_x_origin, int clip_y_origin,
  184.                XserverRegion region);
  185.  
  186. void
  187. XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,
  188.                 int x_off, int y_off, XserverRegion region);
  189.  
  190. void
  191. XFixesSetPictureClipRegion (Display *dpy, XID picture,
  192.                 int clip_x_origin, int clip_y_origin,
  193.                 XserverRegion region);
  194.  
  195. void
  196. XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name);
  197.  
  198. const char *
  199. XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom);
  200.  
  201. void
  202. XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination);
  203.  
  204. void
  205. XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name);
  206.  
  207. #endif    /* XFIXES_MAJOR >= 2 */
  208.  
  209. #if XFIXES_MAJOR >= 3
  210.  
  211. void
  212. XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,
  213.             unsigned left, unsigned right,
  214.             unsigned top, unsigned bottom);
  215.  
  216. #endif    /* XFIXES_MAJOR >= 3 */
  217.  
  218. _XFUNCPROTOEND
  219.  
  220. #endif /* _XFIXES_H_ */
  221.